﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


class CaseInsensitiveSearchInText
{
    static int SearchSubstringInString(string text, string subString)
    {
        text = text.ToLower();
        int result = 0;

        for (int index = 0; index < text.Length; index++)
        {
            int fountIndex = text.IndexOf(subString, index);
            if (fountIndex != -1)
            {
                result++;
                index = fountIndex;
            }
            //Console.WriteLine(fountIndex);
        }

        return result;
    }

    static void Main()
    {
        string text = Console.ReadLine();
        string searchText = Console.ReadLine();

        //Console.WriteLine(text.IndexOf("in", 0));

        Console.WriteLine(SearchSubstringInString(text, searchText));

    }
}

